var productContainer = Vue.extend({

data(){
  return{
  	rightShow:true,
  	detailShow:false,
  	oProduct:'/product',
  	oProductDetail:'/productDetail'
  };
},
mounted: function() {
    this.$nextTick(function() {

    });

},
methods: {

},

watch:{
  $route(to,from){

    //console.log(to.path , from.path);
    var reg = /\/product\/(\d+)/;
    alert(this.$route.path.match(reg).length);

    //if (this.oProduct.indexOf(to.path) == 0 || this.$route.path.match(reg).length == 2) {
    if (this.$route.path.match(reg).length == 2 ) {
	  	this.rightShow=true;
	  	this.detailShow=false;
    } else  if (this.$route.path.indexOf('/productDetail') == 0 ){
	  	this.rightShow=false;
	  	this.detailShow=true;
    };
    //console.log(this.oProduct.indexOf(to.path) , this.oProductDetail.indexOf(to.path));

  }
},


props: ['productData'],
components:{
	navigationPosition,
	productLeft,
	productRight,
	productDetail
},
template:'\
<div>\
	<section class="banner">\
		<div><img src="images/pro_banner.jpg"></div>\
	</section>\
	<div class="com_zi clearfix">\
		<product-left v-bind:product-data-left="productData"></product-left>\
	    <div class="right_zi">\
	   	    <navigation-position v-bind:navigation-position="productData"></navigation-position>\
	        <product-right v-bind:product-data-right="productData" v-show="rightShow"></product-right>\
	        <router-view v-bind:product-det="productData"></router-view>\
	    </div>\
	</div>\
</div>\
',

});